import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {UserManageComponent} from './user-manage/user-manage.component';
import {RoleManageComponent} from './role-manage/role-manage.component';
import {IboxtoolsModule} from '../iboxtools/iboxtools.module';
import {HttpClientModule} from '@angular/common/http';
import {UserService} from './user-manage/user.service';
import {ModalModule} from 'ngx-bootstrap';
import {UserEditComponent} from './user-manage/user-edit/user-edit.component';
import {BrowserModule} from '@angular/platform-browser';
import {UiSwitchModule} from 'ngx-ui-switch';
import {ToastNoAnimationModule} from 'ngx-toastr';
import {RoleEditComponent} from './role-manage/role-edit/role-edit.component';
import {RoleService} from './role-manage/role.service';

@NgModule({
  imports: [
    BrowserModule,
    CommonModule,
    IboxtoolsModule,
    HttpClientModule,
    ModalModule,
    ModalModule.forRoot(),
    UiSwitchModule,
    ToastNoAnimationModule.forRoot({
      closeButton: true,
      tapToDismiss: false,
      preventDuplicates: true
    })
  ],
  entryComponents: [UserEditComponent, RoleEditComponent],
  providers: [
    UserService,
    RoleService
  ],
  exports: [
    UserEditComponent
  ],
  declarations: [UserManageComponent, RoleManageComponent,
    UserEditComponent, RoleEditComponent]
})
export class ManagementModule {
}
